package com.kaikeba.t31ticket.ticket.service.impl;

import com.kaikeba.t31core.common.utils.PageUtils;
import com.kaikeba.t31core.common.utils.Query;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.kaikeba.t31ticket.ticket.dao.PassengerDao;
import com.kaikeba.t31ticket.ticket.entity.PassengerEntity;
import com.kaikeba.t31ticket.ticket.service.PassengerService;


@Service("passengerService")
public class PassengerServiceImpl extends ServiceImpl<PassengerDao, PassengerEntity> implements PassengerService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<PassengerEntity> page = this.page(
                new Query<PassengerEntity>().getPage(params),
                new QueryWrapper<PassengerEntity>()
        );
        page.setTotal(page.getRecords().size());
        return new PageUtils(page);
    }

}